home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CmdTable.h
-
- Contains: Interface to CommandTable class
-
- Owned by: Richard Rodseth
-
- Copyright: © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <3> 5/25/95 jpa List.h --> LinkList.h [1253324]
- <2> 5/12/94 RR include ODTypes.h
- <1> 5/10/94 RR first checked in
- <3> 2/9/94 NP Tiger Team cleanup.
- <2> 2/7/94 NP Tiger Team doings.
- <1> 9/15/93 RR first checked in
-
- To Do:
- In Progress:
- */
-
- #ifndef _CMDTABLE_
- #define _CMDTABLE_
-
- #ifndef _ODTYPES_
- #include "ODTypes.h"
- #endif
-
- #ifndef _PLFMDEF_
- #include "PlfmDef.h"
- #endif
-
- #ifndef _LINKLIST_
- #include <LinkList.h>
- #endif
-
- //==============================================================================
- // Theory of Operation
- //==============================================================================
-
- /*
- This class stores a mapping from menu/item to command number.
- It's currently implemented using a linked list of triples,
- which may not be sufficiently sophisticated.
- */
-
- //==============================================================================
- // Scalar Types
- //==============================================================================
-
- //==============================================================================
- // Constants
- //==============================================================================
-
- const ODCommandID kNoCommand = 0;
-
- //=====================================================================================
- // Classes defined in this interface
- //=====================================================================================
-
- class CommandTable;
-
- //=====================================================================================
- // Classes used by this interface
- //=====================================================================================
-
- class LinkedList;
-
- //=====================================================================================
- // Global Variables
- //=====================================================================================
-
- //=====================================================================================
- // Class CommandTable
- //=====================================================================================
-
- class CommandTable
- {
- public:
-
- CommandTable();
- ODVMethod ~CommandTable();
-
- ODVMethod CommandTable* Copy();
-
- ODVMethod void RegisterCommand(ODCommandID command,
- ODMenuID menu,
- ODMenuItemID menuItem);
-
- ODVMethod ODBoolean IsCommandRegistered(ODCommandID command);
-
- ODVMethod ODCommandID GetCommand(ODMenuID menu,
- ODMenuItemID menuItem);
- ODVMethod ODBoolean GetMenuAndItem(ODCommandID command,
- ODMenuID& menu,
- ODMenuItemID& menuItem);
-
- ODVMethod void UnregisterCommand(ODCommandID command);
- ODVMethod void UnregisterAll();
-
- private:
-
- LinkedList fImplementation;
- };
-
- #endif // _CMDTABLE_